package com.bdqn.zhao.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bdqn.zhao.dao.EpActivityImgMapper;
import com.bdqn.zhao.pojo.EpActivityimg;
import com.bdqn.zhao.service.EpActivityImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EpActivityImgServiceimpl extends ServiceImpl<EpActivityImgMapper, EpActivityimg> implements EpActivityImgService {
 @Autowired
  private EpActivityImgMapper epActivityImgMapper;
    @Override
    public List<EpActivityimg> SelectBysJ(int id) {
        QueryWrapper<EpActivityimg> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("ac_id",id).eq("epac_type",0);
        List<EpActivityimg> epActivities = epActivityImgMapper.selectList(queryWrapper);
        return epActivities;
    }

    @Override
    public List<EpActivityimg> SelectBystJ(int id) {
        QueryWrapper<EpActivityimg> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("ac_id",id).eq("epac_type",1);
        List<EpActivityimg> epActivities = epActivityImgMapper.selectList(queryWrapper);
        return epActivities;
    }
}
